In simple left-shift or right-shift operation, bits shifted beyond the normal data range are discarded, and the bit places in the normal data range that are vacated during the shift are filled with all ZEROs or all ONEs. In a barrel-shift operation to the right or to the left, the bits shifted out of the normal data range are used to fill the vacated bit places. General purpose shifters which can be programmed to provide any of these types of shift to any number of bits are useful, for example, in scan line processors of image data and in multiply/accumulate circuits, particularly those used for handling mantissa normalization and de-normalization. To provide a choice of either simple-shift or barrel-shift operation to as many bits as desired, the practice has been to cascade the two types of programmable data shifters. This is inefficient of hardware and introduces complexity into providing connections for controlling shift.
Such cascading also complicates sticky bit generation. The sticky bit is the LOGIC OR of all the bits shifted out during simple right-shift. The sticky bit is used for maintaining computational accuracy in floating-point-arithmetic data normalization procedures.
Circuitry to provide versatility as to choice among simple-shift left, simple-shift right, barrel-shift left and barrel-shift right operations was sought that had sufficient regularity of circuit architecture as to be suitable for use in integrated-circuit structures laid out with a silicon compiler. Furthermore, that regularity of circuit architecture would have not to be disrupted by making provision for sticky bit generation.
The inventors perceived that a barrel-shift data shifter could be modified by segregating switches in the switching matrix into those switches as would participate in a simple shift as well as a barrel shift and those switches that would participate only in the barrel shift. The former set of switches is caused to be controlled just by shift control signals and the latter set of switches is caused to be controlled by a rotation enable signal as well as by shift control signals. Accordingly simple shift as well as barrel shift can be provided for without having to use a further switching matrix, which further switching matrix is required when a barrel shifter and a simple shifter are cascaded.